﻿using System;
using System.Windows.Forms;

namespace ruscehproj2
{
    
    public partial class bv001az : Form
    {
        bool isActive = false;
        public bv001az()
        {
            
            InitializeComponent();
        }

        public bool getState()
        {
            return isActive;
        }

        private void kit1on_Click(object sender, EventArgs e)
        {
           
        }

        private void kit1off_Click(object sender, EventArgs e)
        {
          
        }

        private void kit2on_Click(object sender, EventArgs e)
        {
           
        }

        private void kit2off_Click(object sender, EventArgs e)
        {
            
        }

        private void bv001az_Load(object sender, EventArgs e)
        {

            if (FormManager.hlp.helpEnabled())
            {
                if (FormManager.shp1.getState())
                {
                    if (isActive)
                    {
                        FormManager.hlp.setHelpId("end");
                    }
                    else FormManager.hlp.setHelpId("vklCtrl");
                    FormManager.hlp.hlpRefresh();
                }
                else 
                {
                    FormManager.hlp.notSoFast();
                }
            
                      
                    
                    FormManager.hlp.Show();
            }

           
           
        }

        private void bv001az_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
               this.Hide();
               FormManager.hlp.Hide();
            }
        }

        private void bv001az_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (isActive)
            {
                FormManager.hlp.setHelpId("4");  
            }
            else
            {
                //FormManager.hlp.setHelpId("3");  
            }
            FormManager.hlp.Hide();
        }

        private void bv001az_HelpRequested(object sender, HelpEventArgs hlpevent)
        {
             FormManager.hlp.Show();
        }

        private void vklCtrl_Click(object sender, EventArgs e)
        {

            if (FormManager.shp1.getState())
            { 
                isActive = true;
                FormManager.hlp.setHelpId("end");
                FormManager.hlp.hlpRefresh();
            }
        }

        
    }
}
